package com.sj.JdbcUtil;

import java.sql.Connection;
import java.sql.DriverManager;

public class JdbcUitl {
    private static Connection conn;
    static {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            conn = DriverManager.getConnection("jdbc:mysql://master:3306/user", "root", "123456");

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public static Connection getConnection() {
        return conn;
    }
}
